import {observable, action} from 'mobx';

class UserStore {
  @observable num;
  @observable userInfo;

  constructor() {
    this.num = 1;
    this.userInfo={
        name:"1",
        age:0
    };
  }
  @action updateUser = (parms) => {
      this.num = this.num + 1;
      this.userInfo.name = parms.name
      this.userInfo.age = parms.age
  };
}

const user = new UserStore();

export default user;
